﻿using Microsoft.AspNetCore.Mvc;
using System.Threading.Tasks;
using WaterCloud.Code;
using WaterCloud.Domain.Entity.STZBManage;
using WaterCloud.Service.STZBManage;

namespace WaterCloud.Web.Areas.STZBManage.Controllers
{
    [Area("STZBManage")]
    public class AccountController : BaseController
    {
        public WeaponsInfo_Service _service { get; set; }

        public IActionResult Index()
        {
            return View();
        }


        /// <summary>
        /// 根据id获取武器详情数据
        /// </summary>
        /// <param name="id">数据id</param>
        /// <param name="type">类型</param>
        /// <returns></returns>
        [HttpGet]
        [HandlerAjaxOnly]
        public async Task<ActionResult> Get_Weapons_GridJson(SoulPage<WeaponsInfo> pagination, string id,int type)
        {
            var data = await _service.Get_Weapons_GridJson(pagination,id,type);
            return Content(pagination.setData(data).ToJson());
        }
    }
}
